﻿package benchmarks;

import benchmarks.benchmarktests.BenchmarkTest;
import benchmarks.benchmarktests.ProducerConsumerTest;
import problemfactories.ProducerConsumerFactory;
import problems.producerconsumer.AbstractProducerConsumer;

public class ProducerConsumerBenchmark extends AbstractBenchmark<AbstractProducerConsumer>
{
	private int nbThreads;
	
	public ProducerConsumerBenchmark(int nbThreads) {
		super(new ProducerConsumerFactory());
		this.nbThreads = nbThreads;
	}

	@Override
	protected BenchmarkTest<AbstractProducerConsumer> createBenchmarkTest(AbstractProducerConsumer solution) {
		return new ProducerConsumerTest(solution, nbThreads);
	}
}